/*******************************************************************************
 * Copyright © 2017 FriendStar.Framework 版权所有
 * Author: HYF
 * Description: FriendStar快速开发平台
 * Website：http://www.FriendStar.cn
*********************************************************************************/
using System.Collections.Generic;
using System.Linq;
using SqlSugarRepository;
using FriendStar.Domain.IRepository.WareHouse;
using FriendStar.Domain.Entity.WareHouse;
using FriendStar.Repository.WareHouse;

namespace FriendStar.Application.WareHouse
{
    public class CPK_31_BL_StoArcPreMaterialApp
    {
        private ICPK_31_BL_StoArcPreMaterialRepository service = new CPK_31_BL_StoArcPreMaterialRepository();

        public List<CPK_31_BL_StoArcPreMaterialEntity> GetList()
        {
            return service.IQueryable().ToList();
        }
      
        public void DeleteForm(string keyValue)
        {
            /*if (service.IQueryable().Where(t => t.F_ParentId.Equals(keyValue)).Count() > 0)
            {
                throw new Exception("删除失败！操作的对象包含了下级数据。");
            }
            else
            {
                service.Delete(t => t.F_Id == keyValue);
            }
            */
        }
     
        public void SavePrepare(List<CPK_31_BL_StoArcPreMaterialEntity> list)
        {
            service.SavePrepare(list);
        }

        public void EditPrepare(CPK_31_BL_StoArcPreMaterialEntity data)
        {
            service.EditPrepare(data);
        }
        public void SavePrepareToOut(List<CPK_31_BL_StoArcPreMaterialEntity> list)
        {
            service.SavePrepareToOut(list);
        }
    }
}
